<template>
    <!-- 弹窗表单 -->
<!-- <lay-button type="primary" @click="openform()">弹窗表单</lay-button> -->

<!-- 普通页面表单 -->
<!-- <PageForm ref="ssss" :fromdata="fromdata" :fromvalue="{}"
     @callback="(e) => { 
        console.log(e);
    }" @errorcallback="() => {
        console.log('errorcallback');
    }
    ">

</PageForm>  -->
<!-- 表单设计器 -->

<FormDesign @preview="(e) => {
    
openform(e)
}
"></FormDesign>
</template>
<script setup lang="ts">
import { ref,h,reactive } from "vue";
import { layer } from "@layui/layer-vue";
import utls from './utls/index';
import   '../../packages/webosformdesign/lib/index.css';
import { LayerForm,PageForm,FormDesign } from "../../packages/webosformdesign/src/index";

import webosutils from "webosutils/webosutils";

const openform = (e) => {

    utls.openform("表单设计器",0, LayerForm,{fromdata:e,fromvalue:{"a":213123}, callback: (e) => {  
        layer.confirm(JSON.stringify(e))
      
    } }, ["50%", "50%"],{});

}
var fromdata = {
    form: {
        mode: "",
        name: "",
        style: "",
        table: "",
        type: "",
        url: "",
    }, data: [],
 rules: {},
 field:{}
};



</script>